package com.ywc.tools;

import android.app.Activity;
import android.content.Intent;
import android.support.v4.app.FragmentActivity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.ywc.tools.communica.CommunicaActivity;
import com.ywc.tools.communica.MessengerService;
import com.ywc.tools.contentprovide.ProvideActivity;
import com.ywc.tools.notification.NotificationActivity;

import java.util.Dictionary;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Map;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        init();
    }

    private void init() {
        ((TextView) findViewById(R.id.bar_center)).setText("主页");
        Map<String,String> map=new HashMap<>();
        Map<String,String> map1=new Hashtable<>();
        Dictionary dictionary = new Dictionary() {
            @Override
            public int size() {
                return 0;
            }

            @Override
            public boolean isEmpty() {
                return false;
            }

            @Override
            public Enumeration keys() {
                return null;
            }

            @Override
            public Enumeration elements() {
                return null;
            }

            @Override
            public Object get(Object key) {
                return null;
            }

            @Override
            public Object put(Object key, Object value) {
                return null;
            }

            @Override
            public Object remove(Object key) {
                return null;
            }
        };
    }

    public void clickUi(View view) {

        switch (view.getId())
        {
            case R.id.provide:
                startActivity( new Intent(this, ProvideActivity.class));
                break;
            case R.id.notification:
                startActivity( new Intent(this, NotificationActivity.class));
                break;
            case R.id.communica:
                startActivity( new Intent(this, CommunicaActivity.class));
                break;
        }
    }
}
